# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Allan McRae <mcrae_allan@hotmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-lingua-preferred
pkgver=0.2.4
pkgrel=8
pkgdesc="Pick a language based on user's preferences"
arch=('any')
url="https://search.cpan.org/dist/Lingua-Preferred"
license=('GPL' 'PerlArtistic')
depends=('perl>=5.10.0')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/E/ED/EDAVIS/Lingua-Preferred-$pkgver.tar.gz)
sha256sums=('fa58c4fac6b676f78caad6b472a785dd0c8fa67004a62294fbcfa3a3eb243c83')

build() {
  cd  "$srcdir"/Lingua-Preferred-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/Lingua-Preferred-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
